﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using Wicresoft.ARConnector;
using Wicresoft.Entity.Reconciliation;

namespace Wicresoft.Reconciliation.DAL
{
    public class CIVerifyResultBatchDetailDBOperate
    {
        private static readonly string ARServer = ConfigurationManager.AppSettings["ARServer"];
        private static readonly string ARUid = ConfigurationManager.AppSettings["ARUid"];
        private static readonly string ARPwd = ConfigurationManager.AppSettings["ARPwd"];

        private ARProxy<CIVerifyResultBatchDetail> cIVerifyResultBatchDetailARProxy;

        public void SaveCIVerifyResultBatchDetail(CIVerifyResultBatchDetail vrbd)
        {
            cIVerifyResultBatchDetailARProxy = new ARProxy<CIVerifyResultBatchDetail>(ARUid, ARPwd, ARServer, string.Empty);
            CIVerifyResultBatchDetail cIVerifyResultBatchDetail = new CIVerifyResultBatchDetail
            {
                BatchNumber = vrbd.BatchNumber,
                CIOwner=vrbd.CIOwner,
                InconsistentCINumber=vrbd.InconsistentCINumber,
                InconsistentRelationshipNumber=vrbd.InconsistentRelationshipNumber
            };
            cIVerifyResultBatchDetailARProxy.CreateEntry(cIVerifyResultBatchDetail);
        }
    }
}
